﻿Public Class TextureManager

    Public Enum TextureType
        Texture2D
        Font
        [Default]
    End Enum

    Public Structure Texture
        Public Name As String
        Public Type As TextureType
        Public Texture2D As Texture2D
        Public Font As SpriteFont
        Public Pixel As Color
    End Structure

    Public Textures As New Dictionary(Of String, Texture)()

    Public Sub New(ByRef Game As DanoQuest) 'Textures.Add("", New Texture With {.name = "", , .Type = })
        Textures.Add("Default", New Texture With {.name = "Default", .Font = Game.Content.Load(Of SpriteFont)("SpriteFont1"), .Texture2D = Game.Content.Load(Of Texture2D)("1PX"), .Type = TextureType.Default})
        Textures.Add("UIPlayerStats", New Texture With {.name = "UIPlayerStats", .Texture2D = Game.Content.Load(Of Texture2D)("PlayerStats"), .Type = TextureType.Texture2D})
        Textures.Add("UITargetStats", New Texture With {.name = "UITargetStats", .Texture2D = Game.Content.Load(Of Texture2D)("TargetStats"), .Type = TextureType.Texture2D})
    End Sub

    Public Function GetTexture(ByVal Name As String) As Texture
        Dim Texture As New Texture
        If Textures.TryGetValue(Name, Texture) = False Then
            MsgBox("Opps!")
            Return Nothing
        End If
        Return Texture
    End Function


End Class
